# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ovos-classifiers
pkgver=0.0.0_alpha37
pkgrel=1
pkgdesc="Open during construction"
url="https://github.com/OpenVoiceOS/ovos-classifiers"
arch="noarch"
license="Apache-2.0"
depends="
	py3-dateutil
	py3-joblib
	py3-nltk
	py3-ovos-utils
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-ovos-plugin-manager
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVoiceOS/ovos-classifiers/archive/refs/tags/V${pkgver//_alpha/a}.tar.gz
	assertEquals.patch
	"
builddir="$srcdir/ovos-classifiers-${pkgver//_alpha/a}"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	# test/unittests/test_opm.py is broken
	.testenv/bin/python3 -m pytest \
		--ignore test/unittests/test_opm.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f81a49f0711cb1f033300beefea7c211b147e095b8a0d00b18b4ea54a6e7cf2dcc586414a3b3e737189f058d72218f354e5e618f7af2e0539ab5f4fdf4fe84b5  py3-ovos-classifiers-0.0.0_alpha37.tar.gz
6ed6be4095a9bcf07196c5ee867fcb6c53114dc7f5c4a58eac52371ab63e629e39b3f9cf15f80e2bf74be7f5439072c02beedcecd3e4f2e8db839eead0a308bb  assertEquals.patch
"
